home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0498.dms / q0498.adf / FGEN < prev    next >
Text File  |  1992-06-07  |  5KB  |  257 lines

  1. curdsk=1
  2. colour=1
  3. yyval=12
  4. skipdel=0
  5.  
  6. cpytitl:dc.b "Lockpick Fast Copier Request",0
  7. cpyques:dc.b "Do you need a copy of the original?",0
  8. copyrst:dc.b "Proceeding with Fast Copy of remaining disks...",0
  9.  
  10. frqtitl:dc.b "Move to destination path... ",0
  11. frqpath:ds.b 256,0
  12. frqname:ds.b 32,0
  13.  
  14. nxtdskm:dc.b "Copy disk "
  15. dskm1:    dc.b "00 of "
  16. dskm2:    dc.b "00?",0
  17. slash:    dc.b "/",0
  18. diskdf1:dc.b "DF",0
  19. diskdf2:dc.b "df",0
  20. num00:    dc.b "0"
  21. num03:    dc.b "3"
  22.  
  23. cmp hdonly,0,2,goto dofreq
  24. docopy=simplereq(cpytitl,cpyques)
  25. cmp docopy,0,0,goto dofreq
  26.  
  27. connect=drives()
  28. cmp connect,-1,0,goto byebye
  29. poke(drname+2,connect+48)
  30. poke(remdsk+19,connect+48)
  31. poke(insdsk2+6,connect+48)
  32.  
  33. drivenum=fcopy(connect,0)
  34. cmp drivenum,0,-1,goto byebye
  35. goto fixdev
  36.  
  37. dofreq:    freturn=freq(frqtitl,frqpath,frqname,1)
  38. cmp freturn,0,0,goto byebye
  39.  
  40. fixdev:    pathlen=strlen(frqpath)
  41.     cmp pathlen,0,0,goto cpynam
  42.  
  43.     pathlen=pathlen+frqpath-1
  44.     terminator=^pathlen>24
  45.     cmp terminator,58,0,goto cpynam1
  46.     cmp terminator,47,0,goto cpynam1
  47.     
  48.     strcat(frqpath,slash)
  49.  
  50. cpynam1:strcat(frqpath,fname)
  51.     goto chkdf
  52.  
  53. cpynam:    strcat(frqpath,drname)
  54.     
  55. chkdf:    sc=memcmp(frqpath,diskdf1,2)
  56.     cmp sc,0,0,goto fixxx
  57.     sc=memcmp(frqpath,diskdf2,2)
  58.     cmp sc,0,2,goto start
  59.  
  60. fixxx:    sc=memcmp(frqpath+2,num00,1)
  61.     cmp sc,0,-1,goto start
  62.     sc=memcmp(frqpath+2,num03,1)
  63.     cmp sc,0,1,goto start
  64.  
  65.     drivenum=frqpath+2
  66.     drivenum=^drivenum>24
  67.     poke(remdsk+19,drivenum)
  68.     poke(insdsk2+6,drivenum)
  69.     drivenum=drivenum-48
  70.     cmp docopy,0,2,goto frxfix
  71.     connect=drivenum<16+drivenum
  72. frxfix:    freturn=0
  73.  
  74.  
  75. fnf:    dc.b "File not found!  Attempting Disk Scan...",0
  76. fnf1:    dc.b "File not found!",0
  77. pnf:    dc.b "Protection not found! Attempting Disk Scan!",0
  78. pnf1:    dc.b "Protection not found!",0
  79. pnf2:    dc.b "*** PARAMETER FAILED! ***",0
  80. worktxt:dc.b "Working, please stand by...",0
  81. clickany:dc.b "Click in this window to exit...",0
  82.  
  83. prof:    dc.b "*** Parameter Successful! ***",0
  84. remdsk:    dc.b "Remove disk from DF0: then click in this window...",0
  85.  
  86. insdsk:    dc.b "Insert BACKUP of",0
  87. insdsk2:dc.b " in DF0: then click in this window...",0
  88.  
  89.     dc.w 0
  90. oritab:    dc.l orig1,fix1,orig2,fix2,orig3,fix3,orig4,fix4,orig5,fix5
  91.     dc.l orig6,fix6,orig7,fix7,orig8,fix8,orig9,fix9
  92.     dc.l orig10,fix10,orig11,fix11,orig12,fix12,orig13,fix13
  93.     dc.l orig14,fix14,orig15,fix15,orig16,fix16,orig17,fix17
  94.     dc.l orig18,fix18,orig19,fix19,orig20,fix20,orig21,fix21
  95.     dc.l orig22,fix22,orig23,fix23,orig24,fix24,orig25,fix25
  96.     dc.l orig26,fix26,orig27,fix27,orig28,fix28,orig29,fix29
  97.     dc.l orig30,fix30,orig31,fix31,orig32,fix32,orig33,fix33
  98.     dc.l orig34,fix34,orig35,fix35,orig36,fix36,orig37,fix37
  99.     dc.l orig38,fix38,orig39,fix39,orig40,fix40,orig41,fix41
  100.     dc.l orig42,fix42,orig43,fix43,orig44,fix44,orig45,fix45
  101.     dc.l 0,0
  102.  
  103. * Open Window and print intro text...
  104. start:    cmp ^winname,"con:",0,winname=winname+18
  105.     pokel(wtitle,winname)
  106.     gosub openwin
  107.  
  108.     cmp docopy,1,0,goto main
  109.     cmp freturn,-1,0,goto main
  110.  
  111.     gosub remm
  112.     txtptr=insdsk
  113.     gosub print3d
  114.     txtptr=dname
  115.     colour=3
  116.     gosub print3d
  117.     txtptr=insdsk2
  118.     colour=1
  119.     gosub print3d
  120.  
  121.     gosub waitsgn
  122.     cmp class,$200000,2,goto chkclow
  123.     cmp code,$1b,0,goto remprta
  124. chkclow:cmp class,$200,0,goto remprta
  125.     skipdel=1
  126.  
  127. main:    txtptr=worktxt
  128.     gosub print3d
  129.     cmp skipdel,0,2,goto begit
  130.     cmp freturn,-1,0,goto begit
  131.     delay(100)
  132.  
  133. begit:    pos=0
  134.     pointer=oritab
  135.  
  136. looper:    orig=^pointer
  137.     pointer=pointer+4
  138.     fix=^pointer
  139.     pointer=pointer+4
  140.     pval=^pointer
  141.     cmp pval,0,0,top=garbage
  142.     cmp pval,0,2,top=pval
  143.  
  144. * Scan file for our string and replace if found...
  145.     pos=fscan(frqpath,orig,fix-orig,fix,top-fix,pos)
  146.     cmp pos,-1,0,goto errpnf
  147.     cmp pos,-2,0,goto errfnf
  148.  
  149.     cmp pval,0,2,goto looper
  150.  
  151. itsok:    txtptr=prof
  152.     gosub print3d
  153.  
  154.     delay(100)
  155.     cmp note1,0,0,goto ky1
  156.     colour=3
  157.     txtptr=note1
  158.     gosub print3d
  159.     cmp note2,0,0,goto ky1
  160.     txtptr=note2
  161.     gosub print3d
  162.     cmp note3,0,0,goto ky1
  163.     txtptr=note3
  164.     gosub print3d
  165.  
  166. ky1:    cmp freturn,0,0,goto ky1a
  167.  
  168.     txtptr=clickany
  169.     gosub print3d
  170.     goto keyout
  171.  
  172. ky1a:    colour=1
  173.     yyval=yyval+10
  174.     txtptr=remdsk
  175.     gosub print3d
  176. ky2:    gosub remm
  177.     gosub waitsgn
  178.     cmp mess,0,0,goto ky2
  179.  
  180.     cmp numdsk,2,-1,goto bye0
  181.     yyval=yyval+10
  182.     txtptr=copyrst
  183.     gosub print3d
  184.     delay(50)
  185.  
  186. ky3:    curdsk=curdsk+1
  187.     cmp curdsk,numdsk,1,goto bye0
  188.     
  189.     tensv=curdsk/10&$ffff
  190.     onesv=tensv*10
  191.     onesv=curdsk-onesv
  192.     poke(dskm1,tensv+48)
  193.     poke(dskm1+1,onesv+48)
  194.  
  195.     tensv=numdsk/10&$ffff
  196.     onesv=tensv*10
  197.     onesv=numdsk-onesv
  198.     poke(dskm2,tensv+48)
  199.     poke(dskm2+1,onesv+48)
  200.  
  201.     docopy=simplereq(cpytitl,nxtdskm)
  202.     cmp docopy,1,-1,goto bye0
  203.     drivenum=fcopy(connect,-1)
  204.     cmp drivenum,0,-1,goto bye0
  205.     goto ky3
  206.  
  207. keyout:    gosub remm
  208.     gosub waitsgn
  209.     cmp mess,0,0,goto keyout
  210. bye0:    gosub closwin
  211. byebye:    end
  212.  
  213. errpnf:    cmp freturn,0,0,goto errp2
  214.  
  215.     txtptr=pnf1
  216.     gosub print3d
  217.     goto prii5a
  218.  
  219. errp2:    txtptr=pnf
  220.     gosub print3d
  221.     goto looper1
  222.  
  223. remprt:    delay(150)
  224.     cmp freturn,-1,0,goto bye0
  225. remprta:yyval=yyval+10
  226.     txtptr=remdsk
  227.     gosub print3d
  228.     goto keyout
  229.  
  230. errfnf:    cmp freturn,0,0,goto errf2
  231.  
  232.     txtptr=fnf1
  233.     gosub print3d
  234.     goto prii5a
  235.  
  236. errf2:    txtptr=fnf
  237.     gosub print3d
  238. looper1:pointer=oritab
  239. looper2:orig=^pointer
  240.     pointer=pointer+4
  241.     fix=^pointer
  242.     pointer=pointer+4
  243.     pval=^pointer
  244.     cmp pval,0,0,top=garbage
  245.     cmp pval,0,2,top=pval
  246.  
  247.     pos=dscan(drivenum,orig,fix-orig,fix,top-fix,0,1)
  248.     cmp pos,-2,0,goto prii5a
  249.     cmp pval,0,2,goto looper2
  250.     goto itsok
  251.  
  252. prii5a:    txtptr=pnf2
  253.     gosub print3d
  254.     goto remprt
  255.  
  256. #i "Params:WINHAND"
  257.